# Homework 1, Applied Data Analysis (19-704)
# Author: Chris Yang
# Date: 2013-03-17

# Part 1: required task
answer <- 2 + 2 #Calculates 2+2 and assign value to "answer"
print(answer)

# Part 2: familiarizing with R

# (1) Creating a vector
x <- c(1:5, 9, 10)
print(x)

# (2) Creating a function
# A simple function that returns the next date of the input date
DateTomorrow <- function(x){
  return(as.Date(as.numeric(x) + 1, origin = "1970-01-01"))
}

print(DateTomorrow(Sys.Date()))


